/*
 * @Author: Langxiaobai 3369824473@qq.com
 * @Date: 2025-05-15 01:28:15
 * @LastEditors: Langxiaobai 3369824473@qq.com
 * @LastEditTime: 2025-06-21 14:47:19
 * @FilePath: \rwm\app\recharge\api.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { get, post } from '@/uitls/axios';


// 币种数据
export const findAllSimpleAssetsFnApi = () => {
  return new Promise((resolve, reject) => {
    get('/apis/asset/findAllSimpleAssets')
      .then((response) => {
        resolve(response);
      })
      .catch((error) => {
        reject(error);
      });
  });
};

export const findAssetChainNetInfoFnAPi = (data:any) => {
  return new Promise((resolve, reject) => {
    get('/apis/asset/findAssetChainNetInfo',data)
      .then((response) => {
        resolve(response);
      })
      .catch((error) => {
        reject(error);
      });
  });
};

export const getAssetCoinDepositAddressFnApi = (data:any) => {
  return new Promise((resolve, reject) => {
    get('/apis/memberAsset/getAssetCoinDepositAddress',data)
      .then((response) => {
        resolve(response);
      })
      .catch((error) => {
        reject(error);
      });
  });
};

export const withdrawAssetSave = (data:any) => {
  return new Promise((resolve, reject) => {
    post('/apis/memberAsset/withdrawAsset',data)
      .then((response) => {
        resolve(response);
      })
      .catch((error) => {
        reject(error);
      });
  });
};
// 充值历史

export const getListRechargeHistoryFn = (data:any) => {
  return new Promise((resolve, reject) => {
    get('/apis/memberAsset/listRechargeHistory',data)
      .then((response) => {
        resolve(response);
      })
      .catch((error) => {
        reject(error);
      });
  });
};

// 提现历史
export const getListWithdrawHistoryFn = (data:any) => {
  return new Promise((resolve, reject) => {
    get('/apis/memberAsset/listPageHistoryWithdrawRecord',data)
     .then((response) => {
        resolve(response);
      })
     .catch((error) => {
        reject(error);
      });
  });
};



